#include "process.h"

void ProcessOn()
{
    int cnt = 0;
    char proc[LEN];
    char swirl[NUM_S] = {'|', '\\', '-', '/'};
    memset(proc, 0, sizeof(proc));
    while(cnt <= 100)
    {
        printf("[%-100s][%3d%%][%c]\r", proc, cnt, swirl[cnt%4]);
        fflush(stdout);
        proc[cnt++] = '#';
        usleep(50000);
    }
    printf("\n");
}
